home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / RAND.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  286 b   |  20 lines

  1.  /* rand.c from page 236*/
  2.  #include <stdio.h>
  3.  #include <stdlib.h>
  4. main()
  5. {
  6.     int i;
  7.                         /* Generate and display
  8.                         20 pseudorandom integers */
  9.     printf("20 pseudorandom integers from \"rand\"\n");
  10.     for(i = 0; i < 20; i++)
  11.     {
  12.         printf("%d\n", rand());
  13.     }
  14. }
  15.  
  16.  
  17.  
  18.  
  19.  
  20.